<?php
namespace Core\Service\Authenticate;

use Model\User;
use Zend\Authentication\AuthenticationService;

class IdentityManager implements IdentityManagerInterface
{
    /**
     * @var AuthenticationService
     */
    protected $authService;

    public function __construct(AuthenticationService $authService)
    {
        $this->authService = $authService;
    }

    public function login($identity, $credential)
    {
        // TODO: Implement login() method.
    }

    public function logout()
    {
        // TODO: Implement logout() method.
    }

    public function hasIdentity()
    {
        // TODO: Implement hasIdentity() method.
    }


    public function getIdentity()
    {
       return $this->authService->getStorage()->read();
    }


    /**
     * @param User $user
     * @return mixed
     */
    public function storeIdentity($user)
    {
        // TODO: Implement storeIdentity() method.
    }
}